<template>
  <div class="count">
    <h2>Count组件</h2>
  </div>
</template>

<script lang="ts">
import {defineComponent} from "vue";

export default defineComponent({
  name: "Count",
});

</script>

<script lang="ts" setup>
import {ref} from "vue";

const num = ref(0)

// 通过ref通信 父组件要想获取组件的信息 子组件必须通过 defineExpose 暴露 需要的数据
defineExpose({
  num
})
</script>

<style scoped>
.count {
  background-color: skyblue;
}
</style>